/*
 * Copyright 2013 Sigurd Randoll.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.digiway.rapidbreeze.server.infrastructure.objectstorage;

import java.util.Objects;

/**
 *
 * @author Sigurd
 */
@Entity
public class ObjectStorageTestObject {

    @Id
    private String id;
    @Column
    private Boolean booleanValue;
    @Column
    private Long longValue;
    @Column
    private Integer integerValue;
    @Column
    private String stringValue;
    @Column
    private ObjectStorageTestObject2 object;

    protected ObjectStorageTestObject() {
    }

    public ObjectStorageTestObject(String id) {
        this.id = id;
    }

    public Boolean getBooleanValueAlternative() {
        return booleanValue;
    }

    public Boolean getBooleanValue() {
        return booleanValue;
    }

    public void setBooleanValue(Boolean booleanValue) {
        this.booleanValue = booleanValue;
    }

    public Long getLongValue() {
        return longValue;
    }

    public void setLongValue(Long longValue) {
        this.longValue = longValue;
    }

    public Integer getIntegerValue() {
        return integerValue;
    }

    public void setIntegerValue(Integer integerValue) {
        this.integerValue = integerValue;
    }

    public String getStringValue() {
        return stringValue;
    }

    public void setStringValue(String stringValue) {
        this.stringValue = stringValue;
    }

    public ObjectStorageTestObject2 getObject() {
        return object;
    }

    public void setObject(ObjectStorageTestObject2 object) {
        this.object = object;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 61 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ObjectStorageTestObject other = (ObjectStorageTestObject) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ObjectStorageTestObject{" + "id=" + id + '}';
    }
}
